<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/FCKEdit" prefix="fck"%>
<%@ include file="/jsp/admintop.jsp"%>
<%@ include file="/jsp/jscommom.jsp"%>
<%@ include file="/jsp/viewtop.jsp"%>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>新闻发布</title>
		<link href="/css/login.css" rel="stylesheet" type="text/css" />
	</head>
	
	<script type="text/javascript">
	//检查密码
	function checkPwd()
	{
		if (document.all.password.value != document.all.repassword.value){
			alert('\u5bf9\u4e0d\u8d77\uff0c\u4e24\u6b21\u8f93\u5165\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\uff01');
			document.all.password.value = "";
			document.all.repassword.value ="";
			document.all.password.focus();
		}
	}
	
	//必填项
 function doMethod(method)
 {
  if(document.all.name.value==""){
    alert("对不起,用户姓名不能为空!");
    return false;
    }
    if(document.all.loginName.value==""){
    alert("对不起,登录帐号不能为空!");
    return false;
    }
   
    document.all.method.value=method;
    document.forms[0].submit();
        document.all.method.value="";
 }
 
 function reset(){
 document.forms[0].reset();
 }
</script>
<%
String adminUserId = request.getParameter("adminUserId");
 %>
	<body>
		<html:form action="/system/admin/popedom/edituser" method="post">
			<html:hidden property="method" />
			<input type="hidden" name="adminUserId" value="<%=adminUserId %>"/>
			<div align="center">
				<table width="97%" border="0" align="center" cellpadding="0"
					cellspacing="1" class="line1">
					<tr>
						<td class="titlebg" colspan="4">
							修改管理用户
						</td>
					</tr>
					<tr>
						<td class="mtdtitle1">
							用户姓名
						</td>
						<td class="mtdtextleft">
							<html:text property="name" styleClass="input1"></html:text>
						</td>

						<td class="mtdtitle1">
							登录帐号
						</td>
						<td class="mtdtextleft">
						<html:text property="loginName"></html:text>
						</td>
					</tr>

					<tr>
						<td class="mtdtitle1">
							用户密码
						</td>
						<td class="mtdtextleft">
							<html:password property="password" styleClass="input1"></html:password>
						</td>

						<td class="mtdtitle1">
							确认密码
						</td>
						<td class="mtdtextleft">
							<input type="password" onblur="checkPwd()" id="repassword" class="input1"/>
						</td>
					</tr>

                    <tr>
                    <td class="mtdtitle1">
                    用户ID
                    </td>
                    
                    <td class="mtdtextleft">
                    <bean:write name="/system/admin/popedom/usermanage" property="id" />
                    </td>
                    
                    <td class="mtdtitle1">
                    创建时间
                    </td>
                    <td class="mtdtextleft">
                    <bean:write name="/system/admin/popedom/usermanage" property="createTime" format="yyyy-MM-dd"/>
                    </td>
                    </tr>
					<tr>
						<td class="mtdtitle1">
							角色描述
						</td>
						<td class="mtdtextleft">
							<html:text property="roleDescript" styleClass="input1"></html:text>
						</td>

						<td class="mtdtitle1">
							类型
						</td>
						<td class="mtdtextleft">
							<html:select property="status" styleClass="input1">
								<html:option value="1">
									有效
								</html:option>
								<html:option value="0">
									无效
								</html:option>
							</html:select>
						</td>
					</tr>

					<tr>
						<td colspan="4" class="mtdtitle1">
						<input type="button" onclick="doMethod('edit')" value="修改"
								class="tbutton" />
						<input type="reset" class="tbutton" value="重置" />
							
								<input type="button" onclick="window.close();" value="关闭"
								class="tbutton" />
								<input type="button" onclick="doMethod('del')" value="删除"
								class="tbutton" />
						</td>
					</tr>
				</table>
			</div>
		</html:form>
	</body>
</html>
